package com.loong.system.dto;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.Size;
import java.io.Serial;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.Length;

/**
 * @Author: ten.x @TableName sys_menu @Date: 2024-01-18 03:25:36 @Version: V1.0
 */
@Data
@Accessors(chain = true)
@TableName(value = "sys_menu")
@EqualsAndHashCode(callSuper = false)
public class MenuAddDTO implements Serializable {

  @Serial
  @TableField(exist = false)
  private static final long serialVersionUID = 1L;

  /** 父id */
  @Size(max = 64, message = "编码长度不能超过64")
  @TableField(value = "pid")
  @Schema(description = "父id")
  @Length(max = 64, message = "编码长度不能超过64")
  private String pid;

  /** 菜单title */
  @Size(max = 255, message = "编码长度不能超过255")
  @TableField(value = "title")
  @Schema(description = "菜单title")
  @Length(max = 255, message = "编码长度不能超过255")
  private String title;

  /** 路径 */
  @Size(max = 255, message = "编码长度不能超过255")
  @TableField(value = "path")
  @Schema(description = "路径")
  @Length(max = 255, message = "编码长度不能超过255")
  private String path;

  /** 菜单类别：字典 1 页面 2 按钮 */
  @Size(max = 255, message = "编码长度不能超过255")
  @TableField(value = "menu_type")
  @Schema(description = "菜单类别：字典 1 页面 2 按钮")
  @Length(max = 255, message = "编码长度不能超过255")
  private String menuType;

  /** 排序 */
  @TableField(value = "order_number")
  @Schema(description = "排序")
  private Integer orderNumber;

  /** 图标 */
  @Size(max = 255, message = "编码长度不能超过255")
  @TableField(value = "icon")
  @Schema(description = "图标")
  @Length(max = 255, message = "编码长度不能超过255")
  private String icon;

  /** 权限标识 */
  @Size(max = 255, message = "编码长度不能超过255")
  @TableField(value = "authority")
  @Schema(description = "权限标识")
  @Length(max = 255, message = "编码长度不能超过255")
  private String authority;

  /** 打开方式 */
  @Size(max = 255, message = "编码长度不能超过255")
  @TableField(value = "target")
  @Schema(description = "打开方式")
  @Length(max = 255, message = "编码长度不能超过255")
  private String target;

  /** 是否隐藏 */
  @TableField(value = "hide")
  @Schema(description = "是否隐藏")
  private Boolean hide;
}
